//
//  FeedbackViewController.m
//  便签
//
//  Created by  on 2022/9/30.
//

#import "FeedbackViewController.h"

@interface FeedbackViewController ()
@property (strong, nonatomic) IBOutlet UITextView *inputView;
@property (strong, nonatomic) IBOutlet UILabel *placeholder;

@end

@implementation FeedbackViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)actionForBtn:(UIButton *)sender {
    if (self.inputView.text.length < 10) {
        return [Toast msg:LS(@"内容过于简单")];
    }
    [Toast startHud:LS(@"提交中...") stopTime:1 handle:^{
        [Toast startHud:LS(@"提交成功") stopTime:1 handle:^{
            [self backBtnAction];
        }];
    }];
}

#pragma mark - UITextViewDelegate
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{
    self.placeholder.hidden = YES;
    return YES;
}
- (BOOL)textViewShouldEndEditing:(UITextView *)textView{
    self.placeholder.hidden = textView.text.length > 0;
    return YES;
}

@end
